package com.itheima.controller;


import com.itheima.domain.Inspector;
import com.itheima.domain.R;
import com.itheima.domain.User;
import com.itheima.service.InspectorService;
import com.itheima.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/inspector")
public class InspectorController {

    @Autowired
    private InspectorService inspectorService;

    @PostMapping
    public R add(@RequestBody Inspector inspector){
        boolean save = inspectorService.save(inspector);
        return R.success(save);
    }
}
